package com.ruoyi.net.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.net.mapper.ElementBusiSrtpQosflowMapper;
import com.ruoyi.net.domain.ElementBusiSrtpQosflow;
import com.ruoyi.net.service.IElementBusiSrtpQosflowService;

/**
 * 网元-业务-srtp-qos流量监管Service业务层处理
 * 
 * @author net
 * @date 2024-12-05
 */
@Service
public class ElementBusiSrtpQosflowServiceImpl implements IElementBusiSrtpQosflowService 
{
    @Autowired
    private ElementBusiSrtpQosflowMapper elementBusiSrtpQosflowMapper;

    /**
     * 查询网元-业务-srtp-qos流量监管
     * 
     * @param id 网元-业务-srtp-qos流量监管主键
     * @return 网元-业务-srtp-qos流量监管
     */
    @Override
    public ElementBusiSrtpQosflow selectElementBusiSrtpQosflowById(String id)
    {
        return elementBusiSrtpQosflowMapper.selectElementBusiSrtpQosflowById(id);
    }

    /**
     * 查询网元-业务-srtp-qos流量监管列表
     * 
     * @param elementBusiSrtpQosflow 网元-业务-srtp-qos流量监管
     * @return 网元-业务-srtp-qos流量监管
     */
    @Override
    public List<ElementBusiSrtpQosflow> selectElementBusiSrtpQosflowList(ElementBusiSrtpQosflow elementBusiSrtpQosflow)
    {
        return elementBusiSrtpQosflowMapper.selectElementBusiSrtpQosflowList(elementBusiSrtpQosflow);
    }

    /**
     * 新增网元-业务-srtp-qos流量监管
     * 
     * @param elementBusiSrtpQosflow 网元-业务-srtp-qos流量监管
     * @return 结果
     */
    @Override
    public int insertElementBusiSrtpQosflow(ElementBusiSrtpQosflow elementBusiSrtpQosflow)
    {
        String uuid = IdUtils.simpleUUID();
        if (StringUtils.isEmpty(elementBusiSrtpQosflow.getId())) {
            elementBusiSrtpQosflow.setId(uuid);
        }
        elementBusiSrtpQosflow.setCreateBy(SecurityUtils.getUsername());
        elementBusiSrtpQosflow.setCreateTime(DateUtils.getNowDate());
        elementBusiSrtpQosflow.setUpdateBy(SecurityUtils.getUsername());
        elementBusiSrtpQosflow.setUpdateTime(DateUtils.getNowDate());
        return elementBusiSrtpQosflowMapper.insertElementBusiSrtpQosflow(elementBusiSrtpQosflow);
    }

    /**
     * 修改网元-业务-srtp-qos流量监管
     * 
     * @param elementBusiSrtpQosflow 网元-业务-srtp-qos流量监管
     * @return 结果
     */
    @Override
    public int updateElementBusiSrtpQosflow(ElementBusiSrtpQosflow elementBusiSrtpQosflow)
    {
        elementBusiSrtpQosflow.setUpdateBy(SecurityUtils.getUsername());
        elementBusiSrtpQosflow.setUpdateTime(DateUtils.getNowDate());
        return elementBusiSrtpQosflowMapper.updateElementBusiSrtpQosflow(elementBusiSrtpQosflow);
    }

    /**
     * 批量删除网元-业务-srtp-qos流量监管
     * 
     * @param ids 需要删除的网元-业务-srtp-qos流量监管主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiSrtpQosflowByIds(String[] ids)
    {
        return elementBusiSrtpQosflowMapper.deleteElementBusiSrtpQosflowByIds(ids);
    }

    /**
     * 删除网元-业务-srtp-qos流量监管信息
     * 
     * @param id 网元-业务-srtp-qos流量监管主键
     * @return 结果
     */
    @Override
    public int deleteElementBusiSrtpQosflowById(String id)
    {
        return elementBusiSrtpQosflowMapper.deleteElementBusiSrtpQosflowById(id);
    }
}
